package com.mlk.waste.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.mlk.waste.po.EngWasteUserOrder;
import com.mlk.waste.vo.EngWasteOrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author trekxu
 * @since 2019-06-18
 */
@Mapper
public interface EngWasteUserOrderMapper extends BaseMapper<EngWasteUserOrder> {

    int updateStatusByOrderCode(@Param("orderCode") String orderCode,@Param("status") int status);

    List<EngWasteOrderVO> queryAllWaitOrder(Integer id);

    int setRecOpenId(@Param("orderCode") String orderCode, @Param("openId") String openId, @Param("date") Date date);

    int updateOrderStatus(@Param("orderCode") String orderCode, @Param("status") Integer status);

    List<EngWasteOrderVO> selectForPage(EngWasteOrderVO vo);

    List<EngWasteOrderVO> waitPick(String openId);

    EngWasteOrderVO selectEngWasteUserOrder(String orderCode);

    int updateOrderTotalNum(@Param("orderCode") String orderCode, @Param("totalNum") BigDecimal totalNum);

    int updateOrderTotalPrice(@Param("orderCode") String orderCode, @Param("totalPrice") BigDecimal totalPrice);

    List<EngWasteOrderVO> customerOrderCount(EngWasteOrderVO engWasteOrderVO);

    EngWasteOrderVO businessSummary(EngWasteOrderVO engWasteOrderVO);

    /**
     * 智能输入的联想功能
     * @param openId
     * @param name
     * @return
     */
    List<EngWasteOrderVO> AIInput(@Param("openId") String openId,@Param("name") String name,@Param("phone") String phone);
}
